package com.oyjd.ybx.fw.tool.module;

import com.oyjd.ybx.fw.util.FileOP;

public class CreateCircle {

	/**
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		long t = 1358659112791L;
		String[] ss = { "A", "B", "C", "D" };
		String[] infos = { "宝宝营养", "宝宝扮靓", "宝宝用品", "宝宝娱乐" };
		StringBuffer sb1 = new StringBuffer("use YBXDB;\r\n\r\n");
		for (int j = 0; j < ss.length; j++) {
			String s = ss[j];
			String c = infos[j];
			for (int i = 1; i <= 20; i++) {
				String aa = "insert into T_INFORMATION (MSG_ID,CLASS_ID,MSG_TITLE,MSG_CONTENT,MSG_PIC,COUNT_LOOK,CREATOR,CREATE_TIME,ORDER_KEY) values ('" + s + i + "', '" + s + "000','" + c + i + "参考资料', '" + c + i + "参考资料','title.jpg',0,'admin',now()," + (t + i) + ");\r\n";
				sb1.append(aa);
			}
		}
		FileOP.writeFile("E:/ybx/src/script/msg.sql", sb1.toString(), "gb2312");

		StringBuffer sb2 = new StringBuffer("use YBXDB;\r\n\r\n");
		for (int j = 0; j < ss.length; j++) {
			String s = ss[j];
			String c = infos[j];
			for (int i = 1; i <= 50; i++) {
				for (int k = 1; k <= 2; k++) {
					for (int f = 1; f <= 4; f++) {
						String bb = "insert into T_GOODS_INFO (GOODS_ID,AGE_ID,CLASS_ID,GOODS_NAME,GOODS_PIC,RECOMMEND,COUNT_LIKE,COUNT_FAVORITE,COUNT_LOOK,COUNT_COMMENT,LINK,CREATOR,CREATE_TIME,CHECKOR,CHECK_TIME,STATUS,ORDER_KEY) values ('" + s + i + k + f + "','1','" + s + f + "0" + k + "','" + "【" + c + s + i+k+f + "】我们的精彩我们做主我们就是最优秀的团体','test.jpg','" + "【" + c + s + i + "】狭义的鱼肝油由海鱼类肝脏炼制的油脂。广义的鱼肝油还包括鲸、海豹等海兽的肝油。常温下呈黄色透明的液体状，稍有鱼腥味。常用于防治夜盲症、角膜软化、佝偻病和骨软化症等，对呼吸道上层粘膜等表皮组织也有保护作用。它主要由不饱和度较高的脂肪酸甘油脂组成，此外还有少量的磷脂和不皂化物。鳕、大菱鲆等是国际上鱼肝油生产的传统原料。中国主要用鲨、鳐、大黄鱼、鲐及马鲀。 狭义的鱼肝油由海鱼类肝脏炼制的油脂。广义的鱼肝油还包括鲸、海豹等海兽的肝油。常温下呈黄色透明的液体状，稍有鱼腥味。常用于防治夜盲症、角膜软化、佝偻病和骨软化症等，对呼吸道上层粘膜等表皮组织也有保护作用。它主要由不饱和度较高的脂肪酸甘油脂组成，此外还有少量的磷脂和不皂化物。鳕、大菱鲆等是国际上鱼肝油生产的传统原料。中国主要用鲨、鳐、大黄鱼、鲐及马鲀',0,0,0,0,'http://www.baidu.com','admin',now(),'admin',now(),2," + (t + i) + ");\r\n";
						sb2.append(bb);
					}
				}
			}
		}
		FileOP.writeFile("E:/ybx/src/script/goods.sql", sb2.toString(), "gb2312");
	}
}
